Skip to content

origin/develop#68

Merged
rktclgh merged 7 commits into
mainfrom
develop
Mar 14, 2026
Merged

origin/develop#68
rktclgh merged 7 commits into
mainfrom
develop

Conversation

@rktclgh

@rktclgh rktclgh commented Mar 14, 2026

Copy link
Copy Markdown
Owner

📢 기능 설명

필요시 실행결과 스크린샷 첨부

연결된 issue

연결된 issue를 자동으로 닫기 위해 아래 {이슈넘버}를 입력해주세요.

close #{67}



🩷 Approve 하기 전 확인해주세요!

  • 리뷰어가 확인해줬으면 하는 사항 적어주세요.
  • [ ]

✅ 체크리스트

  • PR 제목 규칙 잘 지켰는가?
  • 추가/수정사항을 설명하였는가?
  • 이슈넘버를 적었는가?
  • Approve 하기 전 확인 사항 체크했는가?

@coderabbitai

coderabbitai Bot commented Mar 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: af4c932b-c11e-45ff-8cf5-8f918a63d776

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch develop
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 관리자가 인터뷰 질문 생성 정책, 패치 노트 및 일반 사이트 설정을 관리할 수 있는 새로운 기능을 도입하여 플랫폼의 관리 기능을 확장합니다. 또한, 인터뷰 연습 서비스의 질문 생성 로직을 개선하여 관리자 설정에 따라 기술 질문 재사용 여부를 결정할 수 있도록 유연성을 더했습니다. 이는 관리자가 사용자 경험과 콘텐츠를 더욱 세밀하게 제어할 수 있게 하여, 전반적인 시스템 운영 효율성을 높이는 데 기여합니다.

Highlights

  • 관리자 인터뷰 설정 기능 추가: 기술 질문 재사용 정책을 관리할 수 있는 새로운 관리자 API 엔드포인트와 서비스 로직이 추가되었습니다. 이를 통해 관리자는 기술 질문 생성 시 기존 질문을 재사용할지 또는 항상 새로 생성할지 설정할 수 있습니다.
  • 관리자 패치 노트 관리 기능 추가: 패치 노트를 생성, 조회, 수정, 삭제 및 순서 변경할 수 있는 관리자용 API 엔드포인트와 서비스가 도입되었습니다. 이는 사이트 업데이트 내용을 효율적으로 관리하는 데 도움이 됩니다.
  • 관리자 사이트 설정 기능 추가: 랜딩 페이지 버전 라벨과 같은 일반 사이트 설정을 관리할 수 있는 관리자용 API 엔드포인트와 서비스가 추가되었습니다.
  • 인터뷰 연습 서비스 로직 개선: 인터뷰 연습 시작 시 관리자가 설정한 기술 질문 재사용 정책에 따라 질문 후보를 결정하는 로직이 추가되어, 질문 생성 방식의 유연성이 향상되었습니다.
  • 공개 API 엔드포인트 추가: 패치 노트와 사이트 설정을 일반 사용자에게 공개적으로 제공하는 API 엔드포인트가 추가되었으며, 이에 맞춰 보안 설정이 업데이트되었습니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • src/main/kotlin/com/cw/vlainter/domain/interview/controller/InterviewAdminController.kt
    • 관리자 인터뷰 설정 관련 DTO 및 서비스 임포트가 추가되었습니다.
    • 관리자 인터뷰 설정을 조회하고 업데이트하는 GET 및 PATCH 엔드포인트가 추가되었습니다.
  • src/main/kotlin/com/cw/vlainter/domain/interview/dto/AdminInterviewSettingsDtos.kt
    • 관리자 인터뷰 설정 응답 및 업데이트 요청을 위한 데이터 클래스가 추가되었습니다.
  • src/main/kotlin/com/cw/vlainter/domain/interview/entity/AdminInterviewSetting.kt
    • 관리자 인터뷰 설정을 저장하기 위한 JPA 엔티티가 추가되었습니다.
  • src/main/kotlin/com/cw/vlainter/domain/interview/entity/TechQuestionReusePolicy.kt
    • 기술 질문 재사용 정책을 정의하는 Enum 클래스가 추가되었습니다.
  • src/main/kotlin/com/cw/vlainter/domain/interview/repository/AdminInterviewSettingRepository.kt
    • AdminInterviewSetting 엔티티를 위한 JPA 리포지토리가 추가되었습니다.
  • src/main/kotlin/com/cw/vlainter/domain/interview/service/AdminInterviewSettingsService.kt
    • 관리자 인터뷰 설정을 관리하는 서비스 클래스가 추가되었습니다.
  • src/main/kotlin/com/cw/vlainter/domain/interview/service/InterviewPracticeService.kt
    • TechQuestionReusePolicy 임포트가 추가되었습니다.
    • AdminInterviewSettingsService 의존성이 추가되었습니다.
    • 기술 질문 재사용 정책에 따라 질문 후보를 결정하는 로직이 추가되었습니다.
    • 세션 설정에 techQuestionReusePolicy가 추가되었습니다.
    • 질문 재사용 여부를 판단하는 shouldReuseMatchingQuestionshasExplicitTechSelection 프라이빗 메서드가 추가되었습니다.
  • src/main/kotlin/com/cw/vlainter/domain/site/controller/AdminPatchNoteController.kt
    • 관리자 패치 노트를 관리하는 REST 컨트롤러가 추가되었습니다.
  • src/main/kotlin/com/cw/vlainter/domain/site/controller/AdminSiteSettingsController.kt
    • 관리자 사이트 설정을 관리하는 REST 컨트롤러가 추가되었습니다.
  • src/main/kotlin/com/cw/vlainter/domain/site/controller/PatchNoteController.kt
    • 공개 패치 노트를 조회하는 REST 컨트롤러가 추가되었습니다.
  • src/main/kotlin/com/cw/vlainter/domain/site/controller/SiteSettingsController.kt
    • 공개 사이트 설정을 조회하는 REST 컨트롤러가 추가되었습니다.
  • src/main/kotlin/com/cw/vlainter/domain/site/dto/PatchNoteDtos.kt
    • 패치 노트 관련 DTO(PublicPatchNoteResponse, AdminPatchNoteResponse, CreatePatchNoteRequest, UpdatePatchNoteRequest, ReorderPatchNotesRequest)가 추가되었습니다.
  • src/main/kotlin/com/cw/vlainter/domain/site/dto/SiteSettingsDtos.kt
    • 사이트 설정 관련 DTO(PublicSiteSettingsResponse, AdminSiteSettingsResponse, UpdateAdminSiteSettingsRequest)가 추가되었습니다.
  • src/main/kotlin/com/cw/vlainter/domain/site/entity/PatchNote.kt
    • 패치 노트를 저장하기 위한 JPA 엔티티가 추가되었습니다.
  • src/main/kotlin/com/cw/vlainter/domain/site/repository/PatchNoteRepository.kt
    • PatchNote 엔티티를 위한 JPA 리포지토리가 추가되었습니다.
  • src/main/kotlin/com/cw/vlainter/domain/site/service/PatchNoteService.kt
    • 패치 노트를 관리하는 서비스 클래스가 추가되었습니다.
  • src/main/kotlin/com/cw/vlainter/domain/site/service/SiteSettingsService.kt
    • 사이트 설정을 관리하는 서비스 클래스가 추가되었습니다.
  • src/main/kotlin/com/cw/vlainter/global/config/SecurityConfig.kt
    • 공개 패치 노트 및 사이트 설정 API에 대한 접근 권한이 허용되었습니다.
  • src/test/kotlin/com/cw/vlainter/domain/interview/service/AdminInterviewSettingsServiceTests.kt
    • AdminInterviewSettingsService에 대한 단위 테스트가 추가되었습니다.
  • src/test/kotlin/com/cw/vlainter/domain/interview/service/InterviewPracticeServiceTests.kt
    • InterviewPracticeService의 기술 질문 재사용 정책 관련 로직에 대한 단위 테스트가 추가되었습니다.
  • src/test/kotlin/com/cw/vlainter/domain/site/service/PatchNoteServiceTests.kt
    • PatchNoteService에 대한 단위 테스트가 추가되었습니다.
Activity
  • rktclgh 님이 이 PR을 생성했습니다.
  • 이 PR은 origin/develop 브랜치를 대상으로 합니다.
  • 작성자는 기능 설명과 함께 리뷰 전 확인 사항 및 체크리스트를 제공했습니다.
  • 이 PR은 이슈 #67을 닫는 것을 목표로 합니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@rktclgh rktclgh merged commit 72f7556 into main Mar 14, 2026
2 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Vlainter_BackEnd Mar 14, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

이번 PR은 관리자 기능 추가에 초점을 맞추고 있습니다. 기술 질문 재사용 정책, 사이트 버전 라벨, 패치노트 관리 등 다양한 설정 기능이 추가되었네요. 전반적으로 코드 구조가 잘 잡혀있고, 새로운 기능들이 기존 시스템에 잘 통합된 것으로 보입니다. 다만, 몇 가지 개선점을 발견하여 리뷰 코멘트를 남겼습니다. 주로 코드 명확성, 효율성, 그리고 도메인 설계와 관련된 내용입니다. 확인 부탁드립니다.

Comment on lines +16 to +18
class SiteSettingsService(
private val adminInterviewSettingRepository: AdminInterviewSettingRepository
) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

SiteSettingsService에서 AdminInterviewSettingRepository를 재사용하고 있습니다. AdminInterviewSetting 엔티티와 리포지토리는 interview 도메인에 속해있고 이름 또한 인터뷰 설정에 특화되어 있습니다. 사이트 전반의 설정을 저장하기 위해 이들을 사용하는 것은 도메인 경계를 모호하게 만들고 유지보수성을 떨어뜨릴 수 있습니다.

사이트 설정을 위한 별도의 SiteSetting 엔티티와 SiteSettingRepositorysite 도메인 내에 새로 생성하여 사용하는 것을 강력히 권장합니다. 이는 각 도메인의 책임과 역할을 명확하게 분리하여 코드의 구조를 개선하는 데 도움이 됩니다.

Comment on lines +15 to +36
class AdminInterviewSetting(
@Suppress("unused")
@Id
@Column(name = "setting_key", nullable = false, length = 100)
val settingKey: String,

@Column(name = "setting_value", nullable = false, length = 100)
var settingValue: String,

@Column(name = "updated_at", nullable = false)
var updatedAt: OffsetDateTime = OffsetDateTime.now()
) {
@PrePersist
fun prePersist() {
updatedAt = OffsetDateTime.now()
}

@PreUpdate
fun preUpdate() {
updatedAt = OffsetDateTime.now()
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

updatedAt 필드가 생성자에서 OffsetDateTime.now()로 초기화되고, @PrePersist 라이프사이클 콜백에서도 다시 OffsetDateTime.now()로 설정되고 있습니다. 이는 중복된 로직입니다. 필드를 주 생성자 밖으로 이동시키고 lateinit으로 선언하여 초기화 로직을 @PrePersist에서만 관리하도록 하면 코드가 더 명확해집니다.

class AdminInterviewSetting(
    @Suppress("unused")
    @Id
    @Column(name = "setting_key", nullable = false, length = 100)
    val settingKey: String,

    @Column(name = "setting_value", nullable = false, length = 100)
    var settingValue: String
) {
    @Column(name = "updated_at", nullable = false)
    lateinit var updatedAt: OffsetDateTime

    @PrePersist
    fun prePersist() {
        updatedAt = OffsetDateTime.now()
    }

    @PreUpdate
    fun preUpdate() {
        updatedAt = OffsetDateTime.now()
    }
}

Comment on lines +17 to +51
class PatchNote(
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
val id: Long = 0,

@Column(name = "title", nullable = false, length = 160)
var title: String,

@Column(name = "body", nullable = false, columnDefinition = "text")
var body: String,

@Column(name = "sort_order", nullable = false)
var sortOrder: Int = 0,

@Column(name = "is_published", nullable = false)
var isPublished: Boolean = true,

@Column(name = "created_at", nullable = false)
var createdAt: OffsetDateTime = OffsetDateTime.now(),

@Column(name = "updated_at", nullable = false)
var updatedAt: OffsetDateTime = OffsetDateTime.now()
) {
@PrePersist
fun prePersist() {
val now = OffsetDateTime.now()
createdAt = now
updatedAt = now
}

@PreUpdate
fun preUpdate() {
updatedAt = OffsetDateTime.now()
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

createdAtupdatedAt 필드가 생성자에서 OffsetDateTime.now()로 초기화된 후, @PrePersist 콜백에서 즉시 다시 할당되고 있어 중복이 발생합니다. 이 필드들을 주 생성자 밖으로 옮기고 lateinit을 사용하여 초기화 로직을 라이프사이클 콜백에서만 관리하도록 수정하면 코드의 의도가 더 명확해집니다. 추가로, createdAt 필드는 생성된 후에 변경되어서는 안 되므로 @Column(updatable = false) 속성을 추가하는 것이 좋습니다.

class PatchNote(
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    val id: Long = 0,

    @Column(name = "title", nullable = false, length = 160)
    var title: String,

    @Column(name = "body", nullable = false, columnDefinition = "text")
    var body: String,

    @Column(name = "sort_order", nullable = false)
    var sortOrder: Int = 0,

    @Column(name = "is_published", nullable = false)
    var isPublished: Boolean = true
) {
    @Column(name = "created_at", nullable = false, updatable = false)
    lateinit var createdAt: OffsetDateTime

    @Column(name = "updated_at", nullable = false)
    lateinit var updatedAt: OffsetDateTime

    @PrePersist
    fun prePersist() {
        val now = OffsetDateTime.now()
        createdAt = now
        updatedAt = now
    }

    @PreUpdate
    fun preUpdate() {
        updatedAt = OffsetDateTime.now()
    }
}

Comment on lines +91 to +93
patchNoteRepository.saveAll(allPatchNotes)
return patchNoteRepository.findAllByOrderBySortOrderAscCreatedAtDesc()
.map { it.toAdminResponse() }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

patchNoteRepository.saveAll()을 호출한 후에 다시 patchNoteRepository.findAllByOrderBySortOrderAscCreatedAtDesc()를 호출하여 데이터베이스에서 패치노트 목록을 다시 조회하고 있습니다. saveAll() 메소드는 저장된 엔티티 목록을 반환하므로, 이 결과를 직접 사용하여 정렬하고 DTO로 변환하면 불필요한 데이터베이스 조회를 줄여 성능을 개선할 수 있습니다.

        val savedPatchNotes = patchNoteRepository.saveAll(allPatchNotes)
        return savedPatchNotes
            .sortedWith(compareBy<PatchNote> { it.sortOrder }.thenByDescending { it.createdAt })
            .map { it.toAdminResponse() }

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5df8467731

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

import java.time.OffsetDateTime

@Entity
@Table(name = "admin_interview_settings")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add DB migration for new settings and patch note tables

This commit adds entities for admin_interview_settings and patch_notes (AdminInterviewSetting and PatchNote) but does not include any schema migration/DDL in the repository, so deployments that use the default spring.jpa.hibernate.ddl-auto=${JPA_DDL_AUTO:validate} will fail at startup when those tables are not pre-created. Please add the corresponding migration in the same change set to avoid runtime schema-validation failures.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant